Expression for Skull Texture#8500
Conversation
|
additionally you should target the dev/feature branch |
|
Will rewrite this to use 2.15 registersyntax system soon |
I presume you mean the registration api (2.10/2.14)? There weren't really any syntax registration changes in 2.15, just event-value stuff. |
Idk I just call it 2.15's registersyntax stuff |
| SkullMeta meta = (SkullMeta) item.getItemMeta(); | ||
| meta.setPlayerProfile(null); | ||
| item.setItemMeta(meta); | ||
|
|
|
okay I think I resolved everything ^ (most likely missed something) |
sovdeeth
left a comment
There was a problem hiding this comment.
final stretch (you should also consider adding some tests)
| SkullMeta meta = (SkullMeta) item.getItemMeta(); | ||
| meta.setPlayerProfile(null); | ||
| item.setItemMeta(meta); | ||
|
|
Problem
Skript doesn't have it and Skbee sort of has it
Its a very useful utility used by almost every server
Solution
Adds an expression to set/get/reset/delete the skull texture of a player head
eg
set the head texture of {_i} to "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNGNhNDA3ZDNiZGI1ZDBkODAzYjViZmU1MWU4NmU5MWY4YTI5ZTg2NWZjNGNkMzYwMmVhZjA3N2EwYjg1ZGQ2NSJ9fX0="or
reset head texture of {_i}Testing Completed
Compiled and tested on 1.21.11 with no other addons it appears to work fine
Supporting Information
From testing upon texturing a player head if the name is minecraft's default value for the name (eg OwlBe's Head) then it will rename it to " 's head" else if its named eg "&cTest" it won't be renamed
Completes: none
Related: #8448
AI assistance: Tiny bit for retrieving texture value of a player head